Re: fork()

Nathan Lawson (nlawson@statler.csc.calpoly.edu)
Mon, 11 Dec 1995 11:59:44 -0800

> O'm new to the list, so Im not sure if this has been covered, but someone
> can crash any system with a few lines of code. (tested on UNIX, LINUX)
>
> Gcc it, run it and whatever system your on will crash. Is their any way
> to stop users from doing this? I.e. restricting number of process that
> can run?

Try changing the setrlimit() in login.  In particular, I think you might want
to set RLIMIT_NPROC to something small like 60.  That way, any programs spawned
by login (and its child shells) will have that hard limit.

-Nate